<?php

namespace app\components;
use \qore\base\Component;

/**
 * @author Samuel Nogueira <samuel.nogueira.dev@gmail.com>
 */
class LocalFiles extends Component {
	
	public function getAll($directory = '.') {
		return $this->cache('_files', function() use ($directory) {
			return new RecursiveIteratorIterator(
				new RecursiveDirectoryIterator($directory, FilesystemIterator::SKIP_DOTS)
			);
		});
	}
	
}
